import DataType from 'sequelize';
import { sequelize } from '../../sequelize';
const Company = sequelize.define('Company', {

  type: {
    type: new DataType.VIRTUAL(DataType.STRING),
    get() {
      return 'CompanyType';
    },
  },

  id: {
    type: DataType.BIGINT,
    primaryKey: true,
    autoIncrement: true,
  },

  email: {
    type: DataType.STRING,
  },

  name: {
    type: DataType.STRING,
    allowNull: false,
  },

  phone: {
    type: DataType.STRING,
  },

  city: {
    type: DataType.STRING,
  },

  address: {
    type: DataType.STRING,
  },

  note: {
    type: DataType.STRING,
  },

  status: {
    type: DataType.BOOLEAN,
    defaultValue: true,
  }

});

export default Company
